/* 
 * File:   Thread.h
 * Author: ariel
 *
 * Created on 4 de diciembre de 2009, 19:42
 */

#ifndef _THREAD_H
#define	_THREAD_H

#include "Runnable.h"
#include <pthread.h>
#include <linux/stddef.h>

class Thread {
public:
    friend void* run(void*);
    Thread(Runnable* runnable) {
        this->runnable=runnable;
    }
    void start();
    Thread(const Thread& orig);
    virtual ~Thread();
private:
    Runnable * runnable;
    pthread_t thread;
};

#endif	/* _THREAD_H */

